Fix the switch-to-buffer-other-frame function so that it returns the new buffer.
authorRob Browning <rlb@defaultvalue.org>
Sun, 2 Mar 2008 22:25:44 +0000 (14:25 -0800)
committerRob Browning <rlb@defaultvalue.org>
Sun, 2 Mar 2008 22:25:44 +0000 (14:25 -0800)
debian/changelog
debian/patches/fix-switch-to-buffer-other-frame.diff [new file with mode: 0644]
debian/patches/series

index 209c604da62a497b378452a9f27ab0bec9ed98c8..9b31c55e9c7349d425150a66547224252766718b 100644 (file)
@@ -21,7 +21,12 @@ emacs22 (22.1+1-3) unstable; urgency=low
   * Fix a problem with auto save file names.  Thanks to Sven Joachim
     <svenjoac@gmx.de>. (closes: #469017)
 
- -- Rob Browning <rlb@defaultvalue.org>  Sun, 02 Mar 2008 12:44:58 -0800
+  * Fix the switch-to-buffer-other-frame function so that it returns the
+    new buffer.  This also means that find-file-read-only-other-frame will
+    now correctly mark the new buffer as read only.  Thanks to Sven
+    Joachim <svenjoac@gmx.de>. (closes: #457539)
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sun, 02 Mar 2008 14:22:35 -0800
 
 emacs22 (22.1+1-2) unstable; urgency=low
 
diff --git a/debian/patches/fix-switch-to-buffer-other-frame.diff b/debian/patches/fix-switch-to-buffer-other-frame.diff
new file mode 100644 (file)
index 0000000..9ac76c9
--- /dev/null
@@ -0,0 +1,40 @@
+* The switch-to-buffer-other-frame function now returns the new buffer.
+  Patch: fix-switch-to-buffer-other-frame.diff
+  Provided-by: Sven Joachim <svenjoac@gmx.de>
+  Date: Sun, 23 Dec 2007 17:44:08 +0100
+  Added-by: Rob Browning <rlb@defaultvalue.org>
+  Status: merged upstream
+
+  This also means that find-file-read-only-other-frame will now
+  correctly mark the new buffer as read only.
+
+  Upstream changelog entry:
+
+  2007-12-23  Andreas Schwab  <schwab@suse.de>
+
+        * files.el (switch-to-buffer-other-frame): Return the buffer
+        switched to.
+
+Index: sid/lisp/files.el
+===================================================================
+--- sid.orig/lisp/files.el
++++ sid/lisp/files.el
+@@ -1006,14 +1006,16 @@
+   "Switch to buffer BUFFER in another frame.
+ Optional second arg NORECORD non-nil means
+ do not put this buffer at the front of the list of recently selected ones.
++This function returns the buffer it switched to.
+ This uses the function `display-buffer' as a subroutine; see its
+ documentation for additional customization information."
+   (interactive "BSwitch to buffer in other frame: ")
+   (let ((pop-up-frames t)
+       same-window-buffer-names same-window-regexps)
+-    (pop-to-buffer buffer t norecord)
+-    (raise-frame (window-frame (selected-window)))))
++    (prog1
++      (pop-to-buffer buffer t norecord)
++      (raise-frame (window-frame (selected-window))))))
+ (defun display-buffer-other-frame (buffer)
+   "Switch to buffer BUFFER in another frame.
index 76cf134e4b6ddd6030ce7739231e2404a93a5f3f..b64f9ed0421bc8a22c164893e4816264c6c6f0cd 100644 (file)
@@ -14,4 +14,5 @@ version-mention-debian.diff
 support-gnu-kfreebsd.diff
 fix-format-overflow-cve-2007-6109.diff
 fix-auto-save-file-name.diff
+fix-switch-to-buffer-other-frame.diff
 autofiles.diff